package com.lzs.bootsafety.business.sys.service.impl;

import com.lzs.bootsafety.business.sys.entity.SysRoleMenu;
import com.lzs.bootsafety.business.sys.mapper.SysRoleMapper;
import com.lzs.bootsafety.business.sys.mapper.SysRoleMenuMapper;
import com.lzs.bootsafety.business.sys.service.SysRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysRoleMenuServiceImpl implements SysRoleMenuService {
    @Autowired
    private SysRoleMenuMapper sysRoleMenuMapper;
    @Override
    public int batchAddRoleMenu(List<SysRoleMenu> sysRoleMenu) {
        return sysRoleMenuMapper.batchInsertRoleMenu(sysRoleMenu);
    }

    @Override
    public List<Long> getMenuByRoleId(Long roleId) {
        return sysRoleMenuMapper.selectMenuByRoleId(roleId);
    }

    @Override
    public int batchDelRoleMenuByRoleId(Long[] roleIds) {
        return sysRoleMenuMapper.batchRemoveRoleMenuByRoleId(roleIds);
    }
}
